﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Index.aspx.cs" Inherits="ZLDC.Estate.Page.Index" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>XX地产--楼盘营销系统</title>
    <link href="Css/default.css" rel="stylesheet" type="text/css" />
    <link rel="stylesheet" type="text/css" href="js/themes/default/easyui.css" />

    <script type="text/javascript" src="js/jquery-1.4.4.min.js"></script>

    <script type="text/javascript" src="js/jquery.easyui.min.1.2.5.js"></script>

    <script src="../Quantify/popup/popup2/JSnotclose.js" type="text/javascript"></script>

    <script type="text/javascript" src='js/outlook2.js'> </script>

    <script src="../Quantify/js/GetUrl.js" type="text/javascript"></script>

    <style type="text/css">
        A:visited
        {
            text-decoration: none;
        }
        A:link
        {
            text-decoration: none;
        }
        A:hover
        {
            text-decoration: none;
            font-weight: bold;
            color: #000000;
        }
        body
        {
            background: url(about:blank) fixed;
            height: 100%;
        }
        html
        {
            filter: expression(document.execCommand("BackgroundImageCache", false, true));
            height: 100%;
        }
    </style>

    <script type="text/javascript">

        //设置登录窗口
        function openPwd() {
            //            $('#w').window({
            //                title: '修改密码',
            //                width: 300,
            //                modal: true,
            //                shadow: true,
            //                closed: true,
            //                height: 160,
            //                resizable: false
            //            });
            // addTab('修改密码', '../TM/UpdateTel.aspx', 'icon-nav');  
        }

        //关闭登录窗口
        function closePwd() {
            $('#w').window('close');
        }

        //修改密码
        function serverLogin() {
            var $newpass = $('#txtNewPass');
            var $rePass = $('#txtRePass');

            if ($newpass.val() == '') {
                msgShow('系统提示', '请输入密码！', 'warning');
                return;
            }
            if ($rePass.val() == '') {
                msgShow('系统提示', '请在一次输入密码！', 'warning');
                return;
            }

            if ($newpass.val() != $rePass.val()) {
                msgShow('系统提示', '两次密码不一至！请重新输入', 'warning');
                return;
            }

            $.post('../Handler/HandlerSystem.ashx?act=UpDatePwd&pwd=' + $newpass.val(), function(msg) {
                msgShow('系统提示', '恭喜，密码修改成功！<br>您的新密码为：' + msg, 'info');
                $newpass.val('');
                $rePass.val('');
                close();
            })
        }

        $(function() {
            //openPwd();

            //            $('#editpass').click(function() {
            //                $('#w').window('open');
            //            });

            $('#btnEp').click(function() {
                serverLogin();
            })

            $('#btnCancel').click(function() { closePwd(); })

            $('#loginOut').click(function() {
                $.messager.confirm('系统提示', '您确定要退出本次登录吗?', function(r) {

                    if (r) {
                        location.href = '../SignOut.aspx';
                    }
                });
            })

            //alifrm();
        });
        // window.moveTo(0, 0);
        // window.resizeTo(screen.availWidth, screen.availHeight);

        //修改密码
        function UpdatePwd() {
            var $newpass = $('#txtNewPass');
            var $rePass = $('#txtRePass');

            if ($newpass.val() == '') {
                msgShow('系统提示', '请输入密码！', 'warning');
                return;
            }
            if ($rePass.val() == '') {
                msgShow('系统提示', '请在一次输入密码！', 'warning');
                return;
            }

            if ($newpass.val() != $rePass.val()) {
                msgShow('系统提示', '两次密码不一至！请重新输入', 'warning');
                return;
            }
            $.ajax({
                type: 'POST',
                url: '../Handler/HandlerSystem.ashx',
                data: 'act=UpDatePwd&pwd=' + $newpass.val(),
                timeout: '10000',
                error: function() {
                    msgShow("密码修改失败！");
                },
                success: function(json) {
                    if (json != "") {
                        msgShow('系统提示', '恭喜，密码修改成功！<br>您的新密码为：' + json, 'info');
                        $newpass.val('');
                        $rePass.val('');
                        closePwd();
                    } else {
                        msgShow('系统提示', '密码修改失败！', 'info');

                    }

                }
            });
        }

        function Showhelp() {
            window.open("../help/index.htm", "", "left=0,top=0,height=500,width=650,menubar=no,location=no,resizable=yes,scrollbars=yes");
        }
        function alifrm() {

            var station = document.getElementById('hidstation').value;
            var labOther1 = document.getElementById('labOther1').value;

            if (station == '分行经理') {
                ShowIframe("PageClose.aspx", 550, 200, "经理工作选择页面");
            }
            else if (returnTF(station) == false) {

                if (labOther1 == 'fk') {

                    //                var path = "../Quantify/TodayWorks.aspx";
                    //                var parameter = "";
                    //                var style = "dialogWidth:660px; dialogHeight:438px; status:0;scroll:1; help:0; resizable:1;Scrollbars=yes,Toolbar=no,Location=no,Direction=no,Resizeable=no";

                    //                var ToDayWork = "";

                    ShowIframe("../Quantify/TodayWorks.aspx", 700, 550, "业务员工作界面");
                    //if (document.getElementById("hTodayWork").value != "no") {

                    //ToDayWork = window.showModalDialog(path, parameter, style);
                    //}
                    //if (typeof (ToDayWork) == "undefined" || ToDayWork == null) {
                    //document.getElementById("hTodayWork").value = "yes";
                    // } else {
                    // document.getElementById("hTodayWork").value = ToDayWork;
                    //}
                }
            }
        }

        function ShowToDayWork() {
            var ToDayWork = document.getElementById("hTodayWork").value;

            if (ToDayWork == "yes") {
                document.getElementById("hTodayWork").value = "no";
                var path = "../Quantify/TodayWorks.aspx?random" + Math.random();
                var parameter = "";
                var style = "dialogWidth:630px; dialogHeight:438px; status:0;scroll:1; help:0; resizable:1;Scrollbars=yes,Toolbar=no,Location=no,Direction=no,Resizeable=no";

                var ToDayWork = window.showModalDialog(path, parameter, style);
                if (typeof (ToDayWork) == "undefined" || ToDayWork == null) {
                    document.getElementById("hTodayWork").value = "yes";
                } else {
                    document.getElementById("hTodayWork").value = ToDayWork;
                }
            }
        }

        //window.setInterval("ShowToDayWork()", 60000*15);
        
        
        

    </script>

</head>
<body class="easyui-layout" style="overflow-y: hidden; height: 100%" scroll="no">
    <div region="north" split="true" border="false" style="overflow: hidden; height: 35px;
        background: url(images/titlebg.gif) #7f99be repeat-x center 50%; line-height: 20px;
        color: #fff; font-family: Verdana, 微软雅黑,黑体">
        <span style="float: right; padding-right: 20px;" class="head">欢迎<div style="display: none;">
            <asp:Label ID="Label1" runat="server"></asp:Label>
            <asp:Label ID="Label2" runat="server"></asp:Label>
        </div>
            <asp:Label ID="lbUserName" runat="server"></asp:Label>&nbsp;
            <a href="#" id="loginOut">安全退出</a> </span><span style="padding-left: 10px; font-size: 16px;">
                <img src="images/zlyw.gif" width="20" height="20" align="absmiddle" />
                <strong>楼盘营销系统</strong></span>
    </div>
    <noscript>
        <div style="position: absolute; z-index: 100000; height: 2046px; top: 0px; left: 0px;
            width: 100%; background: white; text-align: center;">
            <img src="images/noscript.gif" alt='抱歉，请开启脚本支持！' />
        </div>
    </noscript>
    <input id="userid" runat="server" type="hidden" />
    <div region="west" hide="true" split="true" title="导航菜单" style="width: 140px;" id="west">
        <div id="nav" class="easyui-accordion" fit="true" border="false">
            <!--  导航内容 -->
        </div>
    </div>
    <div id="mainPanle" region="center" style="background: #eee; overflow-y: hidden;
        height: 100%">
        <div id="tabs" class="easyui-tabs" fit="true" border="false" style="height: 100%">
            <div title="办公桌面" style="padding: 5px; overflow: hidden; height: 100%">
                <div style="width: 100%; height: 100%;">
                    <iframe id="iframe1" frameborder="0" runat="server" width="99%" height="100%" scrolling="auto">
                    </iframe>
                </div>
            </div>
        </div>
    </div>
    <div region="south" split="true" border="false" style="cursor: pointer; overflow: hidden;
        height: 25px; background-color: #D2E0F2; line-height: 20px; color: #fff; font-family: Verdana, 微软雅黑,黑体;">
        <marquee width="80%" scrollamount="3" behavior="scroll" scrolldelay="4" onmouseover="this.stop()"
            onmouseout="this.start()"><div style="cursor: pointer;" onclick='self.addTab("流动信息管理", "../UM/FlowList.aspx", "icon-nav")'><font color="red"><%=changered %></font></div></marquee>
    </div>
    <div id="mm" class="easyui-menu" style="width: 150px; display: none">
        <div id="mm-tabupdate">
            刷新</div>
        <div class="menu-sep">
        </div>
        <div id="mm-tabclose">
            关闭</div>
        <div id="mm-tabcloseall">
            全部关闭</div>
        <div id="mm-tabcloseother">
            除此之外全部关闭</div>
        <div class="menu-sep">
        </div>
        <div id="mm-tabcloseright">
            当前页右侧全部关闭</div>
        <div id="mm-tabcloseleft">
            当前页左侧全部关闭</div>
        <div class="menu-sep">
        </div>
        <div id="mm-exit">
            退出</div>
    </div>
    <input type="hidden" id="hTodayWork" runat="server" />
    <input type="hidden" id="hidstation" runat="server" />
    <input type="hidden" id="labOther1" runat="server" />
</body>
</html>
